/***************************************************************************************************
  Copyright(C)   2011-9-5
  All rights reserved.
  File Name: updateserver.h

  Description:更新服务界面模块，也是全部更新子模块的管理类


  ***************************************************************************************************/

#ifndef UPDATEWIDGET_H
#define UPDATEWIDGET_H

#include <QtGui/QWidget>
#include <QHostAddress>
#include <QPushButton>
#include <QLabel>

#include "updatesocket.h"
#include "updatexmlparser.h"
#include "updatetcpserver.h"

class UpdateTcpServer;
class UpdateServer : public QWidget
{
    Q_OBJECT

public:
    UpdateServer(QWidget *parent = 0);
    ~UpdateServer();
    void listen(quint16 port);


private:
    QPushButton*      connButton;
    QPushButton*      breakConnButton;
    QLabel*           stateLabel;

    UpdateTcpServer*    m_updateTcpServer;
private:
    void init();

signals:
    void receUpdateState(const int state);

public slots:
    void updateClientClose();
};

#endif // UPDATEWIDGET_H
